<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    function isIE(){
        return (document.all && window.ActiveXObject && !window.opera) ? true : false;
    }
    function a(fileName,url){
        if (isIE()) {
            alert("是ie执行xxx");
            var aLink = document.createElement('a');
            var blob = new Blob([url]);
            var evt = document.createEvent("HTMLEvents");
            evt.initEvent("click", false, false);//initEvent 不加后两个参数在FF下会报错, 感谢 Barret Lee 的反馈
            aLink.download = fileName;
            aLink.href = URL.createObjectURL(blob);
            aLink.dispatchEvent(evt);

        }  else {
            alert("非ie执行xxx");
            var aLink = document.createElement('a');
            aLink.href = url;
            aLink.download = fileName;
            aLink.click()
        }
      /*  var aLink = document.createElement('a');
        aLink.href = url;
        aLink.download = fileName;
        aLink.click();*/
     /*   */
    }

    a("test","http://7xudc8.com2.z0.glb.qiniucdn.com/hongcheng1464339956893.pdf");
</script>
</body>
</html>